<?php
/***************************************************************
*  Copyright notice
*  (c) 2009, jianyuzhu@gmail.com
*  All rights reserved
*  This script is part of the PPEMI project.
***************************************************************/

//
//exit();

//
if( file_exists('stop.php') ) {
	include_once('stop.php');
}

//
require(dirname(dirname(__FILE__)) . '/includes/application_top.php');

//
$save_tables = array(
			'pp_stats', 'pp_stats_counter', 
				);

//
$tables = $adb->getTables();
for($i=0, $n=sizeof($tables); $i<$n; $i++) {
	if( in_array($tables[$i], $save_tables) ) {
		//
	} elseif( substr($tables[$i], 0, 3) == 'pp_' ) {
		$adb->query("TRUNCATE TABLE `" . $tables[$i] . "`");
	}
}

//
echo 'OK';
//
?>